package com.softstao.guoyu.mvp.presenter;

import com.softstao.guoyu.model.Code;
import com.softstao.guoyu.mvp.interactor.ForgetPassInteractor;
import com.softstao.guoyu.mvp.viewer.BaseViewer;
import com.softstao.guoyu.mvp.viewer.ChangePassViewer;
import com.softstao.guoyu.mvp.viewer.ChangePsdCodeViewer;

/**
 * Created by vaikus on 2017/7/8.
 */

public class ForgetPassPresenter extends BasePresenter<BaseViewer,ForgetPassInteractor> {
    public void sendCode(String mobile){
        interactor.sendCode(mobile,o -> ((ChangePsdCodeViewer)viewer).sendResult((Code) o));
    }

    public void changePsd(String mobile,String code,String newPassWord,String verifyPassword){
        interactor.changePsd(mobile,code,newPassWord,verifyPassword,o -> ((ChangePassViewer)viewer).changeResult(o));
    }
}
